//    Copyright (C) Kherty.  All rights reserved.
using System.Collections.Generic;

namespace OpenLS.Spreadsheet.AnalysisToolPak
{
    internal struct Multiplier
    {
        private string _prefix;
        private double _value;

        public Multiplier(string prefix, double value)
        {
            _prefix = prefix;
            _value = value;
        }

        public string Prefix
        {
            get { return _prefix; }
        }

        public double Value
        {
            get { return _value; }
            set { _value = value; }
        }

        public static IEnumerable<Multiplier> GetAll()
        {
            yield return new Multiplier("E", 1e18);
            yield return new Multiplier("P", 1e15);
            yield return new Multiplier("T", 1e12);
            yield return new Multiplier("G", 1e9);
            yield return new Multiplier("M", 1e6);
            yield return new Multiplier("k", 1e3);
            yield return new Multiplier("h", 1e2);
            yield return new Multiplier("e", 1e1);
            yield return new Multiplier("d", 1e-1);
            yield return new Multiplier("c", 1e-2);
            yield return new Multiplier("m", 1e-3);
            yield return new Multiplier("u", 1e-6);
            yield return new Multiplier("n", 1e-9);
            yield return new Multiplier("p", 1e-12);
            yield return new Multiplier("f", 1e-15);
            yield return new Multiplier("a", 1e-18);
        }
    }
}